﻿<UserControl x:Class="Skynet.C2SModule.Views.BookReader.BookReaderView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:controls="clr-namespace:Infrastructure.WpfClient.Controls;assembly=Infrastructure.WpfClient"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
              Loaded="UserControl_Loaded">
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Popup  StaysOpen="False"
                AllowsTransparency="True"  
                FlowDirection="LeftToRight"  
                IsOpen="{Binding ElementName=btnInsertNote, Path=IsChecked}" 
                PopupAnimation="Fade"   Placement="Mouse">
            <Border>
                <controls:TextEditor  Document="{Binding TitleNote, Mode=TwoWay}" Width="200" Height="100">

                </controls:TextEditor>
            </Border>            
        </Popup>
        <FlowDocumentReader Name="fdReader">
                <FlowDocument>
                    <FlowDocument.ContextMenu>
                        <ContextMenu>
                                <ToggleButton Name="btnInsertNote" Content="Insert Note" ></ToggleButton>
                            
                        </ContextMenu>
                    </FlowDocument.ContextMenu>
                    <Paragraph  Style="{StaticResource Title}">
                        hello word
                    </Paragraph>                    
                </FlowDocument>
            </FlowDocumentReader>        
        <Button Content="Save" Name="btnSave" Click="btnSave_Click" Grid.Row="1"></Button>
    </Grid>    
    
</UserControl>
